#import "RiddleHummingbirdController.h"
        
#import "RiddleHummingbirdModel.h"
#import "RiddleHummingbirdCell.h"
#import "Masonry.h"

@interface RiddleHummingbirdController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *ponderLaughterCollectionView;
@property (nonatomic, strong) NSMutableArray *mergeVolatileModels;

@end

@implementation RiddleHummingbirdController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self opusEmbarkWonderInitlyout];
	[self enchantingJoyousloadData];
}


- (void)opusEmbarkWonderInitlyout {
    UICollectionViewFlowLayout *archive = [[UICollectionViewFlowLayout alloc] init];
    archive.minimumLineSpacing = 10;
    archive.minimumInteritemSpacing = 10;
    archive.itemSize = CGSizeMake(100, 100);
    archive.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.ponderLaughterCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:archive];
    self.ponderLaughterCollectionView.backgroundColor = UIColor.clearColor;
    self.ponderLaughterCollectionView.delegate = self;
    self.ponderLaughterCollectionView.dataSource = self;
    self.ponderLaughterCollectionView.showsHorizontalScrollIndicator = NO;
    self.ponderLaughterCollectionView.showsVerticalScrollIndicator = NO;
    [self.ponderLaughterCollectionView registerClass:[RiddleHummingbirdCell class] forCellWithReuseIdentifier:NSStringFromClass([RiddleHummingbirdCell class])];
    
    [self.view addSubview:self.ponderLaughterCollectionView];
    [self.ponderLaughterCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)mergeVolatileModels {
	if (!_mergeVolatileModels) {
		_mergeVolatileModels = [NSMutableArray array];
	}
	return _mergeVolatileModels;
}

//: 获取数据模型
- (void)enchantingJoyousloadData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.mergeVolatileModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    RiddleHummingbirdCell *echoDoodle = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([RiddleHummingbirdCell class]) forIndexPath:indexPath];
    return echoDoodle;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
